/*
 * S_Sys_Init.c
 *
 *  Created on: 2019��6��3��
 *      Author: hemin
 */
#include "S_Sys_Init.h"

#include "s_sc_uart.h"

#include "h_cc2640r2f_define.h"

#include "h_cc2640r2f_gpio.h"
#include "h_cc2640r2f_uart.h"
#include "h_cc2640r2f_simpletime.h"
//#include "h_cc2640r2f_pwm_simple.h"
#include "h_cc2640r2f_iics.h"
#include "h_cc2640r2f_iic.h"

#include "s_message_handle.h"

#include "s_ccs811.h"
//#include "ccs811_hal.h"

#include "s_smartsensor_manager.h"

#include "s_mpu9250.h"
#include "s_bmp180.h"
#include "s_gps_msg.h"


signed char S_Sys_Init_Peripheral(void)
{
    signed char rslt = 0;

    rslt += S_SC_UART_Init();

    rslt += H_CC2640R2F_IICS0_Init();
    rslt += H_CC2640R2F_IICS1_Init();
//    rslt += H_CC2640R2F_IIC_Init();

    rslt += S_CCS811_PinInit();

    H_CC2640R2F_IICS_Test();


    H_CC2640R2F_UART_Debug("Init rslt is %d\r\n", rslt);

//    H_CC2640R2F_IIC_Test();

     // S_MPU9250_Test();
     // S_BMP180_Test();
     // S_GPS_MSG_Test();


    // S_CCS811_Test();



    H_CC2640R2F_UART_Debug("System init finished\r\n");

    return rslt;
}

signed char S_Sys_CreateTask(void)
{
    //smartsensor_TaskMode_createTask();
    return 0;
}

